﻿using PARK.System.Entitys.Dto.Permission.Department;
using PARK.System.Entitys.Dto.Permission.Organize;
using PARK.System.Entitys.Dto.Permission.OrganizeAdministrator;
using PARK.System.Entitys.Dto.Permission.User;
using PARK.System.Entitys.Model.Permission.Organize;
using PARK.System.Entitys.Model.Permission.User;
using PARK.System.Entitys.Permission;
using Mapster;
using PARK.Common.Model;
using System.Collections.Generic;
using PARK.Common.Helper;

namespace PARK.System.Entitys.Mapper
{
    public class OrganizeMapper : IRegister
    {
        public void Register(TypeAdapterConfig config)
        {
            config.ForType<OrganizeCrInput, OrganizeEntity>()
                .Map(dest => dest.LogoIcon, src => src.logoIcon.ToJson())
            ;
            config.ForType<OrganizeEntity, OrganizeInfoOutput>()
                .Map(dest => dest.logoIcon, src => src.LogoIcon.ToObject<List<FileControlsModel>>())
            ;
        }
    }
}
